import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Microsoft
 * Date: 2023-02-19
 * Time: 10:03
 */
public class Test {
    public static void main(String[] args) {
        int n = 0;
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        int k = 0;
        while (n >= 1) {
            for (int j = 1;j == n;j++) {
                k = k + 1;
            }
            n = n / 2;
        }
        System.out.println(k);




    }
}
